# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/03 10:08:57-06:00 bjorn.helgaas@hp.com # Merge hp.com:/home/helgaas/linux/linux-2.4 # into hp.com:/home/helgaas/linux/ia64-extras # # mm/page_alloc.c # 2004/08/03 10:08:55-06:00 bjorn.helgaas@hp.com +0 -0 # Auto merged # # Makefile # 2004/08/03 10:08:55-06:00 bjorn.helgaas@hp.com +0 -0 # Auto merged # # ChangeSet # 2004/08/03 10:13:08-03:00 marcelo@logos.cnet # Remove mm/page_alloc.c debugging # # mm/page_alloc.c # 2004/08/03 10:05:25-03:00 marcelo@logos.cnet +1 -3 # Remove mm/page_alloc.c debugging # # ChangeSet # 2004/08/03 12:23:00+10:00 nathans@sgi.com # [XFS] Fix diotest4 test case issues with direct reads in XFS. # # SGI Modid: xfs-linux:xfs-kern:176192a # Signed-off-by: Nathan Scott # # fs/xfs/linux-2.4/xfs_lrw.c # 2004/08/03 12:22:53+10:00 nathans@sgi.com +4 -1 # [XFS] Fix diotest4 test case issues with direct reads in XFS. # # ChangeSet # 2004/08/03 12:11:11+10:00 sandeen@sgi.com # [XFS] Don't lock down user pages when doing direct IO; this can # lead to trouble (double-locking zero page, etc). # # SGI Modid: xfs-linux:xfs-kern:175810a # Signed-off-by: Nathan Scott # # fs/xfs/linux-2.4/xfs_buf.c # 2004/08/03 12:11:04+10:00 sandeen@sgi.com +1 -1 # [XFS] Don't lock down user pages when doing direct IO; this can # lead to trouble (double-locking zero page, etc). # # ChangeSet # 2004/08/03 12:07:51+10:00 nathans@sgi.com # [XFS] Fix data loss problem - we no longer update i_size anywhere # without holding i_sem for 2.4 as well. # # SGI Modid: xfs-linux:xfs-kern:174249a # Signed-off-by: Nathan Scott # # fs/xfs/linux-2.4/xfs_vnode.h # 2004/08/03 12:07:43+10:00 nathans@sgi.com +1 -0 # [XFS] Fix data loss problem - we no longer update i_size anywhere # without holding i_sem for 2.4 as well. # # fs/xfs/linux-2.4/xfs_vnode.c # 2004/08/03 12:07:43+10:00 nathans@sgi.com +39 -28 # [XFS] Fix data loss problem - we no longer update i_size anywhere # without holding i_sem for 2.4 as well. # # fs/xfs/linux-2.4/xfs_iops.c # 2004/08/03 12:07:43+10:00 nathans@sgi.com +8 -3 # [XFS] Fix data loss problem - we no longer update i_size anywhere # without holding i_sem for 2.4 as well. # # ChangeSet # 2004/08/02 18:27:46-03:00 shemminger@osdl.org # [PATCH] bridge fix # # The problem was that the br_add_bridge ended up calling register_netdev # that did a rtnl_lock. This fixes that, and gets rid of the bridge_list, # there is no need to keep a separate device list of just bridges. By not # having multiple lists, races are avoided. # # Signed-off-by: Stephen Hemminger # # net/bridge/br_private.h # 2004/08/02 14:39:10-03:00 shemminger@osdl.org +0 -1 # 2.4.27-rc4 bridge fix # # net/bridge/br_ioctl.c # 2004/08/02 16:57:58-03:00 shemminger@osdl.org +1 -6 # 2.4.27-rc4 bridge fix # # net/bridge/br_if.c # 2004/08/02 16:57:58-03:00 shemminger@osdl.org +27 -43 # 2.4.27-rc4 bridge fix # # ChangeSet # 2004/08/02 16:11:25-03:00 marcelo@logos.cnet # Cset exclude: axboe@suse.de|ChangeSet|20040607195639|57919 # # drivers/cdrom/cdrom.c # 2004/08/02 16:11:14-03:00 marcelo@logos.cnet +0 -0 # Exclude # # ChangeSet # 2004/08/02 09:20:22-03:00 marcelo@logos.cnet # Revert DVD-RW write support for now: axboe@suse.de|ChangeSet|20040606235035|46544 # # include/linux/cdrom.h # 2004/08/02 09:20:16-03:00 marcelo@logos.cnet +0 -0 # Exclude # # drivers/scsi/sr.c # 2004/08/02 09:20:16-03:00 marcelo@logos.cnet +0 -0 # Exclude # # drivers/ide/ide-cd.h # 2004/08/02 09:20:16-03:00 marcelo@logos.cnet +0 -0 # Exclude # # drivers/ide/ide-cd.c # 2004/08/02 09:20:16-03:00 marcelo@logos.cnet +0 -0 # Exclude # # drivers/cdrom/cdrom.c # 2004/08/02 09:20:16-03:00 marcelo@logos.cnet +0 -0 # Exclude # # ChangeSet # 2004/08/01 20:50:17-03:00 ralf@linux-mips.org # [PATCH] Fix non-use of HZ in 6pack.c # # Use HZ instead of magic number that assume HZ = 100 for timing in 6pack.c. # # drivers/net/hamradio/6pack.c # 2003/10/21 16:28:22-02:00 ralf@linux-mips.org +7 -4 # Fix non-use of HZ in 6pack.c # # ChangeSet # 2004/08/01 14:57:52-04:00 chrisw@osdl.org # [PATCH] ethtool_get_regs copy right number of bytes to user # # If regs.len is smaller than reglen it's possible to copy more bytes out # than the user asked for. # # Signed-off-by: Chris Wright # # net/core/ethtool.c # 2004/06/13 15:59:15-04:00 chrisw@osdl.org +1 -1 # ethtool_get_regs copy right number of bytes to user # # ChangeSet # 2004/07/31 13:03:15+02:00 marcel@holtmann.org # [Bluetooth] Send HCI_Reset for ISSC USB dongles # # For the USB dongles from ISSC the first command must be a HCI_Reset, # because otherwise the inquiry procedures won't work. # # drivers/bluetooth/hci_usb.c # 2004/07/31 13:02:43+02:00 marcel@holtmann.org +4 -1 # Send HCI_Reset for ISSC USB dongles # # ChangeSet # 2004/07/30 13:16:52-03:00 marcelo@logos.cnet # Changed EXTRAVERSION to -rc4 # TAG: v2.4.27-rc4 # # Makefile # 2004/07/30 13:16:03-03:00 marcelo@logos.cnet +1 -1 # Changed EXTRAVERSION to -rc4 # # ChangeSet # 2004/07/30 16:36:02+02:00 marcel@holtmann.org # [Bluetooth] Fix resetting to default filters # # The problem is that after a successful connection between the Windows # Bluetooth stack and the Linux BlueZ stack, no packets from the device # ever reach the PC running Windows XP Service Pack 2. That is, a ping # from the PC never receives a response, and a ping from BlueZ never # reaches the PC. Linux packet statistics show that the PC packets are # received, but all return traffic seems to be routed over the loopback # interface. # # Immediately after creating the BNEP connection with BlueZ, the Windows # Bluetooth stack sends a BNEP_FILTER_NET_TYPE_SET_MSG with an effective # length of zero. BlueZ interprets this message to mean that no filter # ranges should be allowed. The code zeros the first entry in the filter # list, which is than interpreted as meaning that no ranges of acceptable # packets are available. This interpretation is wrong and leads to all # packets being rejected by BNEP. # # The Bluetooth BNEP specification clearly states the following: # # The length (in octets) of this message is 4+4*N, where N is the number # of disjoint ranges of Networking protocol types that form the complete # set. Note that N=0 (empty set) denotes a reset to default filters (if # any) supported by the remote device. # # Noticed by John Light # # net/bluetooth/bnep/core.c # 2004/07/30 16:25:52+02:00 marcel@holtmann.org +43 -33 # Fix resetting to default filters # # ChangeSet # 2004/07/30 15:55:58+02:00 marcel@holtmann.org # [Bluetooth] Replace BCSP retransmitting message with BT_DBG # # The message "Timeout, retransmitting 1 pkts" is not an error and so # change this into a debug message. # # drivers/bluetooth/hci_bcsp.c # 2004/07/30 15:55:27+02:00 marcel@holtmann.org +2 -1 # Replace BCSP retransmitting message with BT_DBG # # ChangeSet # 2004/07/30 15:49:15+02:00 marcel@holtmann.org # [Bluetooth] Fix kernel panic when device config fails # # If the DEV_CONFIG_PENDING bit is not clear, the open() call has failed # and never succeeded in a call to hci_register_dev() and friends. The # error path in release() ignores this kind of failure and calls close() # without further checking. Now hci_unregister_dev() and friends get # called for a not registered device and thus provoking a kernel panic # with a NULL pointer dereference. # # Noticed by John Dahlstrom # # drivers/bluetooth/btuart_cs.c # 2004/07/30 15:43:50+02:00 marcel@holtmann.org +3 -0 # Fix kernel panic when device config fails # # drivers/bluetooth/bt3c_cs.c # 2004/07/30 15:43:48+02:00 marcel@holtmann.org +3 -0 # Fix kernel panic when device config fails # # drivers/bluetooth/bluecard_cs.c # 2004/07/30 15:43:44+02:00 marcel@holtmann.org +3 -0 # Fix kernel panic when device config fails # # drivers/bluetooth/dtl1_cs.c # 2004/07/30 15:43:22+02:00 marcel@holtmann.org +3 -0 # Fix kernel panic when device config fails # # ChangeSet # 2004/07/28 19:04:39-07:00 shemminger@osdl.org # [PKT_SCHED]: netem update for 2.4 # # This makes the netem code for 2.4 equivalent to the 2.6.8 stuff. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/sched/sch_netem.c # 2004/07/28 19:04:35-07:00 shemminger@osdl.org +773 -68 # [PKT_SCHED]: netem update for 2.4 # # This makes the netem code for 2.4 equivalent to the 2.6.8 stuff. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # include/linux/pkt_sched.h # 2004/07/28 19:04:35-07:00 shemminger@osdl.org +1 -1 # [PKT_SCHED]: netem update for 2.4 # # This makes the netem code for 2.4 equivalent to the 2.6.8 stuff. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # ChangeSet # 2004/07/28 19:00:56-07:00 shemminger@osdl.org # [BRIDGE]: Fix assertion failure in 2.4.27-rc3 # # The code path for some ioctl's is different in 2.4 than 2.6 (it goes # through IP in 2.4). Therefore the following is needed. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/bridge/br_ioctl.c # 2004/07/28 19:00:52-07:00 shemminger@osdl.org +5 -2 # [BRIDGE]: Fix assertion failure in 2.4.27-rc3 # # The code path for some ioctl's is different in 2.4 than 2.6 (it goes # through IP in 2.4). Therefore the following is needed. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # ChangeSet # 2004/07/27 18:55:55-03:00 kkeil@suse.de # [PATCH] I4L: Fix IRQ-sharing lockup in nj_s # # Herbert Xu: # > This is a backport of a fix that's already in 2.6. The problem is that # > nj_s is enabling interrupts before the handler is even installed. This # > patch delays the call until after the handler has been registered. # # Yes, correct. # # Signed-off-by: Karsten Keil # # ===== drivers/isdn/hisax/nj_s.c 1.7 vs edited ===== # # drivers/isdn/hisax/nj_s.c # 2004/07/27 05:19:41-03:00 kkeil@suse.de +1 -1 # I4L: Fix IRQ-sharing lockup in nj_s # # drivers/usb/serial/pl2303.c # 2004/07/27 15:07:39-03:00 zaitcev@redhat.com +1 -1 # USB: correct dbg() arguments in pl2303 # # ChangeSet # 2004/07/27 15:04:54-03:00 zaitcev@redhat.com # [PATCH] USB: missing rcomplete=0 in printer.c (David Woodhouse) # # Synopsys: CUPS refuses to work with HP 1200, kernel produces silly messages. # # I do not remember if David Woodhouse actually wrote it, but he certainly # reported the problem. # # -- Pete # # drivers/usb/printer.c # 2004/07/27 14:28:53-03:00 zaitcev@redhat.com +1 -0 # USB: missing rcomplete=0 in printer.c (David Woodhouse) # # ChangeSet # 2004/07/27 15:04:24-03:00 zaitcev@redhat.com # [PATCH] USB: correct dbg() arguments in pl2303 (Phil Dibowitz) # # Patch by Phil Dibowitz. # # ChangeSet # 2004/07/27 15:03:18-03:00 zaitcev@redhat.com # [PATCH] USB: add free_len=0 initialization to ipaq.c (Ganesh Varadaraja) # # This is what happens when driver writers neglect memset after kmalloc. # Patch by Ganesh Varadaraja. # # drivers/usb/serial/ipaq.c # 2004/07/27 14:30:49-03:00 zaitcev@redhat.com +1 -0 # USB: add free_len=0 initialization to ipaq.c # # ChangeSet # 2004/07/27 15:03:05-03:00 zaitcev@redhat.com # [PATCH] USB: GET_ID from nonzero interface (errandir_news@mph.eclipse.co.uk) # # Synopsys: Fix GET_ID for nonzero interface. IIRC, it's HP-1300 combo. # # The patch looks bizzare, but it is actually correct and the code is # not too bad. The 2.6 patch from errandir_news@mph.eclipse.co.uk, this # is a backport. # # I must admit I didn't hear from anyone using the stock 2.4 # having this problem, but I had a couple of users on RHL. # # drivers/usb/printer.c # 2004/07/27 14:28:53-03:00 zaitcev@redhat.com +16 -6 # USB: GET_ID from nonzero interface # # ChangeSet # 2004/07/27 10:14:06-03:00 jochen@jochen.org # [PATCH] Update Jochen CREDITS entry # # I've moved, so here is my new address. # # CREDITS # 2004/07/27 05:23:09-03:00 jochen@jochen.org +2 -2 # I've moved # # ChangeSet # 2004/06/22 10:32:55-06:00 eranian@hpl.hp.com # ia64: fix perfmon buffer init # # Signed-Off-By: stephane eranian # Signed-Off-By: Bjorn Helgaas # # arch/ia64/kernel/perfmon.c # 2004/06/22 10:18:00-06:00 eranian@hpl.hp.com +2 -0 # fix missing reset of the vma structure during allocation # of sampling buffer. # # ChangeSet # 2004/06/16 10:28:33-06:00 eranian@hpl.hp.com # [PATCH] ia64: fix info in /proc/pal/*/bus_info # # This patch fixes to minor bugs: # - corrected descriptions for bit 52 and 53 of the /proc/pal/CPU*/bus_info # entry; they were swapped # - corrected a typo for bit 55 of the /proc/pal/CPU*/bus_info entry # # Signed-off-by: Stephane Eranian # Signed-off-by: David Mosberger # Signed-off-by: Bjorn Helgaas # # arch/ia64/kernel/palinfo.c # 2004/06/16 10:25:13-06:00 eranian@hpl.hp.com +2 -2 # ia64: fix info in /proc/pal/*/bus_info # # ChangeSet # 2004/06/10 14:15:40-06:00 arun.sharma@intel.com # [PATCH] ia64: tighten FPH state context switch check # # In the absence of this patch, a process can set it's own mfh bit and # potentially view another process's high floating point registers. So a # check is needed. # # Signed-off-by: Arun Sharma # Signed-off-by: David Mosberger # # include/asm-ia64/system.h # 2004/06/10 14:15:12-06:00 arun.sharma@intel.com +1 -1 # ia64: tighten FPH state context switch check # diff -Nru a/Makefile b/Makefile --- a/Makefile 2004-08-03 13:01:46 -07:00 +++ b/Makefile 2004-08-03 13:01:46 -07:00 @@ -93,6 +93,7 @@ CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \ -fno-strict-aliasing -fno-common +CFLAGS += -g ifndef CONFIG_FRAME_POINTER CFLAGS += -fomit-frame-pointer endif @@ -307,8 +308,7 @@ $(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in xconfig: symlinks - $(MAKE) -C scripts kconfig.tk - wish -f scripts/kconfig.tk + @echo -e "***\n* Sorry, xconfig is broken; use \"make menuconfig\" instead.\n***" menuconfig: include/linux/version.h symlinks $(MAKE) -C scripts/lxdialog all diff -Nru a/mm/page_alloc.c b/mm/page_alloc.c --- a/mm/page_alloc.c 2004-08-03 13:01:46 -07:00 +++ b/mm/page_alloc.c 2004-08-03 13:01:46 -07:00 @@ -77,11 +77,11 @@ /* * Temporary debugging check. */ -#define BAD_RANGE(zone, page) \ -( \ - (((page) - mem_map) >= ((zone)->zone_start_mapnr+(zone)->size)) \ - || (((page) - mem_map) < (zone)->zone_start_mapnr) \ - || ((zone) != page_zone(page)) \ +#define BAD_RANGE(zone, page) \ +( \ + (((page) - mem_map) >= ((zone)->zone_start_mapnr+(zone)->size)) \ + || (((page) - mem_map) < (zone)->zone_start_mapnr) \ + || ((zone) != page_zone(page)) \ ) /* @@ -631,7 +631,7 @@ unsigned long nr, total, flags; total = 0; - if (zone->size) { + if (zone->realsize) { spin_lock_irqsave(&zone->lock, flags); for (order = 0; order < MAX_ORDER; order++) { head = &(zone->free_area + order)->free_list; @@ -663,13 +663,44 @@ /* * Builds allocation fallback zone lists. */ -static inline void build_zonelists(pg_data_t *pgdat) +static int __init build_zonelists_node(pg_data_t *pgdat, zonelist_t *zonelist, int j, int k) { - int i, j, k; + zone_t *zone; + switch (k) { + default: + BUG(); + /* + * fallthrough: + */ + case ZONE_HIGHMEM: + zone = pgdat->node_zones + ZONE_HIGHMEM; + if (zone->realsize) { +#ifndef CONFIG_HIGHMEM + BUG(); +#endif + zonelist->zones[j++] = zone; + } + case ZONE_NORMAL: + zone = pgdat->node_zones + ZONE_NORMAL; + if (zone->realsize) + zonelist->zones[j++] = zone; + case ZONE_DMA: + zone = pgdat->node_zones + ZONE_DMA; + if (zone->realsize) + zonelist->zones[j++] = zone; + } + + return j; +} + +static void __init build_zonelists(pg_data_t *pgdat) +{ + int i, j, k, node, local_node; + local_node = pgdat->node_id; + printk("Building zonelist for node : %d\n", local_node); for (i = 0; i <= GFP_ZONEMASK; i++) { zonelist_t *zonelist; - zone_t *zone; zonelist = pgdat->node_zonelists + i; memset(zonelist, 0, sizeof(*zonelist)); @@ -681,33 +712,32 @@ if (i & __GFP_DMA) k = ZONE_DMA; - switch (k) { - default: - BUG(); - /* - * fallthrough: - */ - case ZONE_HIGHMEM: - zone = pgdat->node_zones + ZONE_HIGHMEM; - if (zone->size) { -#ifndef CONFIG_HIGHMEM - BUG(); -#endif - zonelist->zones[j++] = zone; - } - case ZONE_NORMAL: - zone = pgdat->node_zones + ZONE_NORMAL; - if (zone->size) - zonelist->zones[j++] = zone; - case ZONE_DMA: - zone = pgdat->node_zones + ZONE_DMA; - if (zone->size) - zonelist->zones[j++] = zone; - } + j = build_zonelists_node(pgdat, zonelist, j, k); + /* + * Now we build the zonelist so that it contains the zones + * of all the other nodes. + * We don't want to pressure a particular node, so when + * building the zones for node N, we make sure that the + * zones coming right after the local ones are those from + * node N+1 (modulo N) + */ + for (node = local_node + 1; node < numnodes; node++) + j = build_zonelists_node(NODE_DATA(node), zonelist, j, k); + for (node = 0; node < local_node; node++) + j = build_zonelists_node(NODE_DATA(node), zonelist, j, k); + zonelist->zones[j++] = NULL; } } +void __init build_all_zonelists(void) +{ + int i; + + for(i = 0 ; i < numnodes ; i++) + build_zonelists(NODE_DATA(i)); +} + /* * Helper functions to size the waitqueue hash table. * Essentially these want to choose hash table sizes sufficiently @@ -750,6 +780,31 @@ return ffz(~size); } +static unsigned long memmap_init(struct page *start, struct page *end, + int zone, unsigned long start_paddr, int highmem) +{ + struct page *page; + + for (page = start; page < end; page++) { + set_page_zone(page, zone); + set_page_count(page, 0); + SetPageReserved(page); + INIT_LIST_HEAD(&page->list); + if (!highmem) + set_page_address(page, __va(start_paddr)); + start_paddr += PAGE_SIZE; + } + return start_paddr; +} + +#ifdef HAVE_ARCH_MEMMAP_INIT +#define MEMMAP_INIT(start, end, zone, paddr, highmem) \ + arch_memmap_init(memmap_init, start, end, zone, paddr, highmem) +#else +#define MEMMAP_INIT(start, end, zone, paddr, highmem) \ + memmap_init(start, end, zone, paddr, highmem) +#endif + #define LONG_ALIGN(x) (((x)+(sizeof(long))-1)&~((sizeof(long))-1)) /* @@ -771,10 +826,8 @@ BUG(); totalpages = 0; - for (i = 0; i < MAX_NR_ZONES; i++) { - unsigned long size = zones_size[i]; - totalpages += size; - } + for (i = 0; i < MAX_NR_ZONES; i++) + totalpages += zones_size[i]; realtotalpages = totalpages; if (zholes_size) for (i = 0; i < MAX_NR_ZONES; i++) @@ -783,7 +836,7 @@ printk("On node %d totalpages: %lu\n", nid, realtotalpages); /* - * Some architectures (with lots of mem and discontinous memory + * Some architectures (with lots of mem and discontigous memory * maps) have to search for a good mem_map area: * For discontigmem, the conceptual mem map array starts from * PAGE_OFFSET, we need to align the actual array onto a mem map @@ -796,7 +849,7 @@ MAP_ALIGN((unsigned long)lmem_map - PAGE_OFFSET)); } *gmap = pgdat->node_mem_map = lmem_map; - pgdat->node_size = totalpages; + pgdat->node_size = 0; pgdat->node_start_paddr = zone_start_paddr; pgdat->node_start_mapnr = (lmem_map - mem_map); pgdat->nr_zones = 0; @@ -813,7 +866,7 @@ if (zholes_size) realsize -= zholes_size[j]; - printk("zone(%lu): %lu pages.\n", j, size); + printk("zone(%lu): %lu pages.\n", j, realsize); zone->size = size; zone->realsize = realsize; zone->name = zone_names[j]; @@ -824,6 +877,7 @@ zone->nr_active_pages = zone->nr_inactive_pages = 0; + pgdat->node_size += realsize; if (!size) continue; @@ -884,16 +938,10 @@ * up by free_all_bootmem() once the early boot process is * done. Non-atomic initialization, single-pass. */ - for (i = 0; i < size; i++) { - struct page *page = mem_map + offset + i; - set_page_zone(page, nid * MAX_NR_ZONES + j); - set_page_count(page, 0); - SetPageReserved(page); - INIT_LIST_HEAD(&page->list); - if (j != ZONE_HIGHMEM) - set_page_address(page, __va(zone_start_paddr)); - zone_start_paddr += PAGE_SIZE; - } + zone_start_paddr = MEMMAP_INIT(mem_map + offset, + mem_map + offset + size, + nid * MAX_NR_ZONES + j, zone_start_paddr, + (j == ZONE_HIGHMEM ? 1 : 0)); offset += size; for (i = 0; ; i++) { @@ -934,7 +982,6 @@ (unsigned long *) alloc_bootmem_node(pgdat, bitmap_size); } } - build_zonelists(pgdat); } void __init free_area_init(unsigned long *zones_size)